// 路由管理

/* 
使用明细：
   utils: 放置页面路由（对象）
   url：路由配置
   path：路由路径配置
   name：路由名称配置
   component：路由组件
   meta：路由传参, （参数可通过this.$route.meta获取）
   title：路由相关数据，用于页面中路由渲染  name 路由名称 child 传参
*/


function getRouterFun () {
    return {
        utils: {
            index: { // 官网首页路由
                url: [ // 路由配置
                   {
                       path: '/',
                       redirect: '/indexInfo'
                   },{
                       path: '/indexInfo',
                       name: 'indexInfo',
                       component: IndexInfo
                   } ,{
                       path: '/manifest',
                       name: 'manifest',
                       component: Manifest
                   },{
                       path: 'custom',
                       name: 'custom',
                       component: Custom
                   },{
                       path: '/factory',
                       name: 'factory',
                       component: Factory
                   },{
                       path: '/staff',
                       name: 'staff',
                       component: Staff
                   },{
                       path: '/download',
                       name: '/download',
                       component: Download
                   }
                ]
            },
            company: { // 公司管理中心路由
                url: [ // 路由配置
                    {
                        path: '/',
                        redirect: '/material' // 重定向
                    },{
                        path: '/material',
                        name: 'material',
                        component: Material,
                        children: [
                            {
                                path: '/',
                                redirect: 'legal' // 重定向
                            },
                            {
                                path: 'legal',
                                name: 'legal',
                                component: Legal
                            },{
                                path: 'info',
                                name: 'info',
                                component: Info
                            },{
                                path: 'identity',
                                name: 'identity',
                                component: Identity
                            },{
                                path: 'product',
                                name: 'product',
                                component: Product
                            },{
                                path: 'style',
                                name: 'style',
                                component: Style
                            },{
                                path: 'info',
                                name: 'info',
                                component: Info
                            },{
                                path: 'type',
                                name: 'type',
                                component: Type
                            },{
                                path: 'num',
                                name: 'num',
                                component: Num
                            },{
                                path: 'equip',
                                name: 'equip',
                                component: Equip
                            },{
                                path: 'capacity',
                                name: 'capacity',
                                component: Capacity
                            },{
                                path: 'ambient',
                                name: 'ambient',
                                component: Ambient
                            }
                        ],
                    },{
                        path: '/order',
                        name: 'order',
                        component: Order
                    },{
                        path: '/inform',
                        name: 'inform',
                        component: Inform,
                        children: [
                            {
                                path: '/',
                                redirect: 'iindex'
                            },{
                                path: 'iindex',
                                name: 'iindex',
                                component: Iindex
                            },{
                                path: 'ipublish',
                                name: 'ipublish',
                                component: Ipublish
                            }
                        ]
                    },{
                        path: '/news',
                        name: 'news',
                        component: News
                    },{
                        path: '/recruit',
                        name: 'recruit',
                        component: Recruit,
                        children: [
                            {
                                path: '/',
                                redirect: 'rindex',
                            },{
                                path: 'rindex',
                                name: 'rindex',
                                component: Rindex
                            },{
                                path: 'rdetail',
                                name: 'rdetail',
                                component: Rdetail
                            },{
                                path: 'rpublish',
                                name: 'rpublish',
                                component: Rpublish
                            }
                        ]
                    },{
                        path: '/collect',
                        name: 'collect',
                        component: Collect
                    },{
                        path: '/business',
                        name: 'business',
                        component: Business
                    },{
                        path: '/account',
                        name: 'account',
                        component: Account
                    },{
                        path: '*',
                        redirect: '/'
                    }
                ],
                title: [ // 路由名称, 用于页面渲染路由
                    {
                        name: 'material',
                        text: '资料设置',
                        child: {
                            id: 0,
                            url: [
                                {
                                    name: 'legal',
                                    text: '法人信息'
                                },{
                                    name:'info',
                                    text: '公司信息'
                                },{
                                    name:'identity',
                                    text: '公司认证'
                                },{
                                    name:'product',
                                    text: '公司产品'
                                },{
                                    name:'style',
                                    text: '产品风格'
                                },{
                                    name:'type',
                                    text: '产品种类'
                                },{
                                    name:'num',
                                    text: '款式数量'
                                },{
                                    name:'equip',
                                    text: '工厂设备'
                                },{
                                    name:'capacity',
                                    text: '产量产能'
                                },{
                                    name:'ambient',
                                    text: '公司环境'
                                }
                            ]
                        }
                    },{
                        name: 'order',
                        text: '订单流程',
                        child: {
                            id: 1,
                            url: {}
                        }
                    },{
                        name: 'inform',
                        text: '资讯发布',
                        child: {}
                    },{
                        name: 'news',
                        text: '我的消息',
                        child: {}
                    },{
                        name: 'recruit',
                        text: '我的招聘',
                        child: {}
                    },{
                        name: 'collect',
                        text: '我的收藏',
                        child: {}
                    },{
                        name: 'business',
                        text: '商务合作',
                        child: {}
                    },{
                        name: 'account',
                        text: '财务账户',
                        child: {}
                    }
                ]
            }
        }
    }
}